<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<button id="btn">提交</button>
<script>
   document.querySelector('#btn').addEventListener('click',function (){
       const xhr = new XMLHttpRequest()
       xhr.open('post','http://127.0.0.1:8000/server/ie?time='+Date.now()) //加时间为了防止ie浏览器缓存
       xhr.send()
       xhr.onreadystatechange = function (){
           if (xhr.readyState === 4){
               if (xhr.status >=200 && xhr.status <300){
                   console.log(xhr.response)
               }
           }
       }
   })
</script>
</body>
</html>